package com.zj.service;

import com.zj.mapper.HostInfoPoMapper;
import com.zj.po.HostInfoPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @program: monitor147
 * @description:
 * @author: zy
 * @create: 2025-06-04 21:26
 */
@Service
@Transactional(readOnly = true)
public class HostInfoServiceImpl implements HostInfoService{

    @Autowired
    private HostInfoPoMapper hostInfoPoMapper;

    //在业务层通过要完成将  PO转换成  DTO  来完成.
    @Override
    public List<HostInfoPO> findHostInfoList() {
        return this.hostInfoPoMapper.findHostInfoList();
    }

    @Override
    public List<HostInfoPO> findHostInfo(String host) {
        return this.hostInfoPoMapper.findHostInfo( host );
    }
    //查询最近100条记录  提高性能方法：每次查一条记录，在客户端存下来，
}